package com.reactim.message.dto;

import com.reactim.message.entity.Conversation;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 会话响应DTO
 */
@Data
public class ConversationResponse {
    
    private String conversationId;
    private Conversation.ConversationType type;
    private List<Long> participants;
    private Long groupId;
    private String lastMessageId;
    private String lastMessageContent;
    private LocalDateTime lastMessageTime;
    private Long messageCount;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    // 扩展信息
    private Long unreadCount;           // 未读消息数量
    private String conversationName;    // 会话名称
    private String conversationAvatar;  // 会话头像
    private Boolean isOnline;           // 对方是否在线（私聊）
    private List<ParticipantInfo> participantInfos; // 参与者信息
    
    /**
     * 参与者信息
     */
    @Data
    public static class ParticipantInfo {
        private Long userId;
        private String nickname;
        private String avatarUrl;
        private Boolean isOnline;
    }
}